package com.second.app.thread.线程基础.day05;

import com.second.app.thread.线程基础.day05.inner.Public1Class;
import com.second.app.thread.线程基础.day05.inner.PublicClass;

/**
 * @Author GYZ
 * @Date 2023/11/23
 * <pre>
 *  内部类 静态内部类的获取
 * </pre>
 */
public class Run {

    public static void main(String[] args) {
        PublicClass publicClass = new PublicClass();
        publicClass.setUserName("usernameValue");
        publicClass.setPassword("passwordValue");

        System.out.println(publicClass.getUserName()+" "+publicClass.getPassword());

        //实例化 内置类
        PublicClass.PrivateClass privateClass = publicClass.new PrivateClass();
        privateClass.setAge("ageValue");
        privateClass.setAddress("addressValue");
        System.out.println(privateClass.getAge()+" "+privateClass.getAddress());

        System.out.println("========================================");

        Public1Class public1Class = new Public1Class();
        public1Class.setUserName("usernameValue");
        public1Class.setPassword("passwordValue");

        System.out.println(public1Class.getUserName()+" "+public1Class.getPassword());

        //实例化 静态内置类
        Public1Class.PrivateClass privateClass1 = new Public1Class.PrivateClass();
        privateClass1.setAge("ageValue");
        privateClass1.setAddress("addressValue");
        System.out.println(privateClass1.getAge()+" "+privateClass1.getAddress());
    }
}
